﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Dal;

namespace Web.service
{
    /// <summary>
    /// RoleMenuService 的摘要说明
    /// </summary>
    public class RoleMenuService : BaseService<RoleMenuModel>
    {
        private RoleMenuDal dal = DalFactory.CreateRoleMenuDal();
        public Object Query(HttpContext context)
        {
            int roleId = int.Parse(context.Request["roleId"]);
            RoleMenuModel bean = new RoleMenuModel();
            bean.roleId = roleId;
            List<RoleMenuModel> list = dal.Query(bean);
            return list;
        }

        public void ModifyMenuId(HttpContext context)
        {
            int roleId = int.Parse(context.Request["roleId"]);
            String menuIds = context.Request["menuIds"];
            dal.UpdateMenuId(roleId, menuIds);
        }
       
    }
}